package com.wk.oms.controller;

import com.wk.common.bean.Resp;
import com.wk.oms.entity.Order;
import com.wk.oms.service.OrderService;
import com.wk.oms.vo.OrderSubmitVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService  orderService;


    /**
     * 保存订单
     */
    @PostMapping
    Resp<Order> saveOrder(@RequestBody OrderSubmitVO orderSubmitVO) {
        Order order = orderService.saveOrder(orderSubmitVO);
        return Resp.ok(order);
    }

}

